Last update: October 2017
Station (STA) mode is a mode to use FlashAir as a client in a wireless LAN. This tutorial shows how to configure FlashAir to be station mode.
FlashAir runs as a Access Point (AP) mode by default. A wireless LAN device such as a PC and smartphone connects to the FlashAir as a wireless LAN client (station). So the device cannot access to the Internet when the device connected to the FlashAir.
We can configure FlashAir to be station mode. It allows for a development machines to access to the FlashAir and the Internent at a same time.
We need to set FlashAir operation mode, information about a wireless LAN AP, and a name to identify the FlashAir before we configure the card to be station mode. There are two ways to configure: 1) modifying CONFIG file directly, and 2) using config.cgi via wireless LAN connection.
Following four parameters need to be changed. A word with brackets is a corresponding parameter explained in API Guide / CONFIG.
We can modify the parameters by editing
/SD_WLAN/CONFIG
directly.
There are hidden attributes attached to this directory, therefore we will use tools to handle this
hidden
folder.
(If you use a Mac, edit
/Volumes/(Volume Lable Name)/SD_WLAN/CONFIG
.)
We need to add a parameter if it does not exist in the file. We need not care about the order of
the parameters.
After editing, the file will be like the following example:
APPMODE=5
APPNAME=myflashair
APPSSID=FOOSSID
APPNETWORKKEY=password0123
CIPATH=/DCIM/100__TSB/FA000001.JPG
VERSION=F19BAW3AW2.00.00
CID=02544d535730384708c00b7d7800d201
PRODUCT=FlashAir
VENDOR=TOSHIBA
MASTERCODE=18002d4ff0a2
We can change the parameters except FlashAir Identifier (APPNAME) through wireless LAN by using config.cgi.
We need the Mastercode to configure the parameters. If the Mastercode is not set to your card, set it by calling a command. For example:
http://flashair/config.cgi?MASTERCODE=18002d4ff0a2
After that, we will send a command as follows to set parameters:
http://flashair/config.cgi?MASTERCODE=18002d4ff0a2&APPSSID=FOOSSID&APPNETWORKKEY=password0123&APPMODE=5
FlashAir will reboot after it received the configuration command.
Important: If you use an Android device, see Usage Note section below.
We can access FlashAir card which is correctly configured to the Station Mode from a device such as a PC or a smartphone which is connected to the same wireless LAN.
For example, input a URL with the FlashAir identifier (APPNAME) to your browser like:
http://myflashair/
If you use a Mac, use this instead:
http://myflashair.local/
Every FlashAir must have unique identifier (APPNAME) if those join a same wireless LAN.
FlashAir supports NetBIOS over TCP/IP and Bonjour protocols for an another device to look up the FlashAir via the network. (See below.) If you have a trouble to access FlashAir, please check if your device or access point supports those protocols.
Especially, Android device generally does not support them.
If your device or access point does not support those protocols, you can use IP address directly assigned by the access point instead, for example:
http://192.168.0.2/
Important: FlashAir does not support Bonjour Service Announcement.
If you can not connect to FlashAir after setting
APPMODE=5
, check the following.
APPSSID
,
APPNETWORKKEY
in the CONFIG file if it is not connected.APPNAME
must be single. To connect more than one FlashAir please see
How to access FlashAir individually using APPNAME.[WLANSD]
to CONFIG. For details, please see
CONFIG writing sample.APPMODE=4
and let FlashAir operate as a wireless LAN parent. If it does not work, there is
a possibility
that a problem has occurred in FlashAir itself.
Reference Accessing FlashAir with
http://flashair/
may cause occasionally a redirect loop. Please set the IP address in CONFIG
and access
FlashAir. Please set it referring to
How to recognaize and access to FlashAir individually by
setting IP address.
Please also check FAQ and Toshiba Memory Corporation FAQ together.